import React, { Component } from 'react';
import product from '../../../img1/shoucang1.png'
import { Link } from 'react-router-dom'
import axios from '../../../axios/axios'
class mycollect extends Component {
    constructor(props) {
        super(props);
        this.state = {
            arr: []
        }
    }
    componentWillMount(){
        axios.get('small/commodity/verify/v1/browseList?page=1&count=8').then(res=>{
            this.setState({
                arr:res.data.result
            })
        })
    }
    render() {
        return (
            <div className="mycollect">
                <div className="mycollect-t">
                    我的收藏
                </div>
                <div className="mycollect-c">
                    {this.state.arr.map((v,i)=>{
                        return(<div key={v.id}>
                            <img src={v.masterPic} alt="" />
                        <span>{v.commodityName}</span>
                        <p>
                            <span>￥{v.price}</span>&nbsp;<i>￥{v.price+100}</i>&nbsp;
                                <Link to="###">取消收藏</Link>
                        </p>
                        </div>)
                    })}
                </div>
            </div>
        );
    }
}

export default mycollect;